PICTools Programmer's Reference
PIC2List RawData Packet Functions

The P2PktRawData structure is defined as:

 
Copy Code
typedef struct {
   BYTE     Type;
   DWORD    Length;
   CHAR     RawDescription[4];
   DWORD    RawLength;
   BYTE     RawData[1];
} P2PktRawData;

P2LAddRawData

 
Copy Code

P2PktRawData* P2LAddRawData(P2LIST* p2l, const char *desc, DWORD len, const BYTE* data);

P2LAddRawData adds a raw data packet to the PIC2List, enlarging the list if necessary.  It is not an error to have more than one raw data packet in a PIC2List with the same desc.  If data is a null pointer, then the RawData field in the added raw data packet is not initialized.  P2LAddRawData returns a pointer to the new packet.  If P2LAddRawData returns 0, then a memory allocation error occurred attempting to enlarge the list for the new packet.

P2LDeleteRawData

 
Copy Code

BOOL P2LDeleteRawData(P2LIST* p2l, P2PktRawData* pkt);

P2LDeleteRawData is called to delete a raw data packet from the PIC2List.  pkt must point to the Type field of a raw data packet within the PIC2List.  No validation is performed.

P2LFindRawData

 
Copy Code

P2PktRawData* P2LFindRawData(const P2LIST* p2l, const char* desc);

P2LFindRawData finds the first raw data packet in the PIC2List with a RawDescription matching desc.  P2LFindRawData returns 0 if there are no raw data packets with a matching RawDescription.

P2LFirstRawData

 
Copy Code

P2PktRawData* P2LFirstRawData(const P2LIST* p2l);

P2LFirstRawData returns a pointer to the first raw data packet with any RawDescription in the PIC2List.  P2LFirstRawData returns 0 if there are no raw data packets.

P2LNextRawData

 
Copy Code

P2PktRawData* P2LNextRawData(const P2LIST* p2l, P2PktRawData* pkt);

P2LNextRawData returns a pointer to the first raw data packet following pkt.  pkt must point into the PIC2List to the Type field of a raw data packet.  No validation is performed.  If 0 is returned, then there is no raw data packet following the packet.

P2LFindNextRawData

 
Copy Code

P2PktRawData* P2LFindNextRawData(const P2LIST* p2l, const P2PktRawData* pkt);

P2LFindNextRawData returns a pointer to the raw data packet following pkt whose RawDescription matches pkt‑>RawDescription.  Pkt must point into the PIC2List to the Type field of a raw data packet.  No validation is performed.  P2LFindNextRawData returns 0 if there are no raw data packets following pkt in the PIC2List with a matching pkt->RawDescription.

 

 


©2022. Accusoft Corporation. All Rights Reserved.

Send Feedback